function [filt_vzorky,odpoved_filt] = audspec_GPLP(vykon_spektrum, vzorkovacia, pocet_filtrov,  min_frek, bwidth)
%[aspectrum,wts] = audspec(pspectrum, sr, nfilts, fbtype, minfreq, maxfreq, sumpower, bwidth)
%
% perform critical band analysis (see PLP)
% takes power spectrogram as input

if nargin < 2;  vzorkovacia = 16000;                          end
if nargin < 3;  pocet_filtrov = 26;      end
if nargin < 4;  min_frek = 400;    end
if nargin < 5;  bwidth = 1.0;   end

[frek,ramce] = size(vykon_spektrum);

nfft = (frek-1)*2;


odpoved_filt = fft2greenmx_GPLP(nfft, vzorkovacia, pocet_filtrov, bwidth, min_frek);      %odpoved filtra


odpoved_filt = odpoved_filt(:, 1:frek);

filt_vzorky = odpoved_filt * vykon_spektrum;       %kazda vzorka sa vynasobi odpovedov filtra


end

